# 导入 需要的 library 库
# https://blog.csdn.net/Varalpha/article/details/104908046
# https://zhengbopei.blog.csdn.net/article/details/106392121?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.control
import matplotlib.pyplot as plt  # 画图
import numpy as np  # 科学计算

a, b = 0.8, 5
t = np.linspace(0, 5, 100)  # 另一种表达式 t = np.mgrid[0:5:0.01]
y = b * np.exp(-a * t) * np.sin(np.pi * t)
plt.xlabel('time')
plt.ylabel('Y')
plt.plot(t, y)
plt.grid(True)
plt.show()
